Integrand size = 12, antiderivative size = 73 \[ \int (a+b \csc (c+d x))^3 \, dx=a^3 x-\frac {b \left (6 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3867, 3855, 3852, 8} \[ \int (a+b \csc (c+d x))^3 \, dx=a^3 x-\frac {b \left (6 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \]
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 3867
Rubi steps \begin{align*} \text {integral}& = -\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \int \left (2 a^3+b \left (6 a^2+b^2\right ) \csc (c+d x)+5 a b^2 \csc ^2(c+d x)\right ) \, dx \\ & = a^3 x-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}+\frac {1}{2} \left (5 a b^2\right ) \int \csc ^2(c+d x) \, dx+\frac {1}{2} \left (b \left (6 a^2+b^2\right )\right ) \int \csc (c+d x) \, dx \\ & = a^3 x-\frac {b \left (6 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d}-\frac {\left (5 a b^2\right ) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{2 d} \\ & = a^3 x-\frac {b \left (6 a^2+b^2\right ) \text {arctanh}(\cos (c+d x))}{2 d}-\frac {5 a b^2 \cot (c+d x)}{2 d}-\frac {b^2 \cot (c+d x) (a+b \csc (c+d x))}{2 d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(152\) vs. \(2(73)=146\).
Time = 3.44 (sec) , antiderivative size = 152, normalized size of antiderivative = 2.08 \[ \int (a+b \csc (c+d x))^3 \, dx=\frac {8 a^3 c+8 a^3 d x-12 a b^2 \cot \left (\frac {1}{2} (c+d x)\right )-b^3 \csc ^2\left (\frac {1}{2} (c+d x)\right )-24 a^2 b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-4 b^3 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+24 a^2 b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+4 b^3 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+b^3 \sec ^2\left (\frac {1}{2} (c+d x)\right )+12 a b^2 \tan \left (\frac {1}{2} (c+d x)\right )}{8 d} \]
[In]
[Out]
Time = 0.72 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.16
method | result | size |
parts | \(a^{3} x +\frac {b^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}-\frac {3 a^{2} b \ln \left (\csc \left (d x +c \right )+\cot \left (d x +c \right )\right )}{d}-\frac {3 a \,b^{2} \cot \left (d x +c \right )}{d}\) | \(85\) |
derivativedivides | \(\frac {a^{3} \left (d x +c \right )+3 a^{2} b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-3 a \,b^{2} \cot \left (d x +c \right )+b^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(86\) |
default | \(\frac {a^{3} \left (d x +c \right )+3 a^{2} b \ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )-3 a \,b^{2} \cot \left (d x +c \right )+b^{3} \left (-\frac {\csc \left (d x +c \right ) \cot \left (d x +c \right )}{2}+\frac {\ln \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right )}{2}\right )}{d}\) | \(86\) |
parallelrisch | \(\frac {4 \left (6 a^{2} b +b^{3}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 a^{3} x d -\cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b^{3}+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b^{3}-12 \cot \left (\frac {d x}{2}+\frac {c}{2}\right ) a \,b^{2}+12 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a \,b^{2}}{8 d}\) | \(97\) |
norman | \(\frac {a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {b^{3}}{8 d}+\frac {b^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{8 d}-\frac {3 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d}+\frac {3 a \,b^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+\frac {b \left (6 a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}\) | \(121\) |
risch | \(a^{3} x +\frac {b^{2} \left (-6 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}+6 i a +b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) a^{2}}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d}+\frac {3 b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d}\) | \(149\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 155 vs. \(2 (67) = 134\).
Time = 0.25 (sec) , antiderivative size = 155, normalized size of antiderivative = 2.12 \[ \int (a+b \csc (c+d x))^3 \, dx=\frac {4 \, a^{3} d x \cos \left (d x + c\right )^{2} - 4 \, a^{3} d x + 12 \, a b^{2} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 2 \, b^{3} \cos \left (d x + c\right ) + {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (6 \, a^{2} b + b^{3} - {\left (6 \, a^{2} b + b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \]
[In]
[Out]
\[ \int (a+b \csc (c+d x))^3 \, dx=\int \left (a + b \csc {\left (c + d x \right )}\right )^{3}\, dx \]
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.30 \[ \int (a+b \csc (c+d x))^3 \, dx=a^{3} x + \frac {b^{3} {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{4 \, d} - \frac {3 \, a^{2} b \log \left (\cot \left (d x + c\right ) + \csc \left (d x + c\right )\right )}{d} - \frac {3 \, a b^{2}}{d \tan \left (d x + c\right )} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.84 \[ \int (a+b \csc (c+d x))^3 \, dx=\frac {b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 8 \, {\left (d x + c\right )} a^{3} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, {\left (6 \, a^{2} b + b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - \frac {36 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}}{8 \, d} \]
[In]
[Out]
Time = 18.59 (sec) , antiderivative size = 234, normalized size of antiderivative = 3.21 \[ \int (a+b \csc (c+d x))^3 \, dx=\frac {b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {b^3\,{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}+\frac {b^3\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2\,d}+\frac {2\,a^3\,\mathrm {atan}\left (\frac {2\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}{-2\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^3+6\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,a^2\,b+\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,b^3}\right )}{d}+\frac {3\,a^2\,b\,\ln \left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {3\,a\,b^2\,\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {3\,a\,b^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d} \]
[In]
[Out]